home *** CD-ROM | disk | FTP | other *** search
- ;----------------------------------------------------------------------------
- ; POSTINI.SCR Intellicomm v2 script to configure POSTFILE.SCR. This
- ; script is executed when you select 'POSTFILE.SCR Settings' from the
- ; File Transfer Settings screen in the Intellicomm main setup. If you
- ; delete this script, you will not be able to use the POSTFILE.SCR Settings
- ; option in the main setup.
- ;----------------------------------------------------------------------------
-
- gosub Initialize
-
- strset s "∞" 0 $SCRN_WIDTH ;fill 's' with ∞, to the screen width
-
- assign i 1
- while i <= $SCRN_HEIGHT
- printraw 1 i $NORM_COLOR s
- inc i
- endwhile
-
- eraseline 1 $BORDER_COLOR
- printraw -1 1 $BORDER_COLOR "Please read the OVERVIEW before you change anything"
-
- ;----------------------------------------------------------------------------
- MainMenu:
- ;----------------------------------------------------------------------------
-
- menudefine m1 "-" m2 m3 m4 "-" m5 m6 m7
-
- menuhlp 1 "What is POSTFILE.SCR and why must I set it up?"
- menuhlp 2 "Define picture types and a picture viewer [or disable picture viewing]"
- menuhlp 3 "Change the commands POSTFILE uses to decompress newly downloaded archives"
- menuhlp 4 "Define your Virus Checker and what POSTFILE does with contaminated files"
- menuhlp 5 "Enter the File Manager if you must look for a file or install something"
- menuhlp 6 "Select to temporarily [or permanently] disable POSTFILE.SCR and exit"
- menuhlp 7 "Select to save your changes, enable POSTFILE.SCR if necessary, and exit"
-
- menuboxv "POSTFILE Main Setup" "" last_selection
- assign last_selection $MENUSELECTION ;save for next menu display
- eraseline $SCRN_HEIGHT $STAT_COLOR
-
- switch $MENUSELECTION
- case 1
- gosub Overview
- endcase
- case 2
- gosub PicSettings
- endcase
- case 3
- gosub ArcSettings
- endcase
- case 4
- gosub VirusSettings
- endcase
- case 5
- FileMan
- endcase
- case 6
- goto Disable
- endcase
- case 7
- goto Enable
- endcase
- endswitch
-
- goto MainMenu
-
- ;----------------------------------------------------------------------------
- PressKey:
- ;----------------------------------------------------------------------------
- pause "^M^JPlease press a key... "
- cls
- return
-
-
- ;----------------------------------------------------------------------------
- Enable:
- ;----------------------------------------------------------------------------
-
- assign s $SCRIPT_DIR "POSTFILE.SCR"
- exist s goto check_save
-
- assign i $SCRIPT_DIR "POSTFILE.RCS"
- exist i goto rename_rcs
-
- wndopen "NOTE"
- print "Cannot enable POSTFILE.SCR!^M^J"
- print "Neither POSTFILE.SCR nor POSTFILE.RCS (the disabled filename) could be found"
- print "in the " $SCRIPT_DIR " directory."
- gosub PressKey
-
- wndclose
- goto check_save
-
- rename_rcs:
-
- rename i s
-
- check_save:
-
- menudefine "~Yes" "~No"
- menuboxh "Exit" "^ISave POSTFILE.SCR settings?"
-
- if $MENUSELECTION = 1 ;save POSTFILE.INI
- fopen fh postfileini "w"
- if $ERRORLEVEL <> 0
- msgwind "Can't open POSTFILE.INI"
- exit
- endif
- fputs fh picview
- fputs fh picfiles
- fputs fh zipx
- fputs fh arcx
- fputs fh arjx
- fputs fh lhax
- fputs fh zoox
- fputs fh pakx
- fputs fh viruschk
- fputs fh virusaction
- fputs fh holdingarea
- fputs fh FILEMAN_if_clean
- fputs fh FILELIST_if_virus
- fputs fh describe_4DOS
- if $ERRORLEVEL <> 0 msgwind "Disk write error!"
- fclose fh
- endif
-
- exit
-
- ;----------------------------------------------------------------------------
- Initialize:
- ;----------------------------------------------------------------------------
-
- vpush
-
- variable picview
- variable picfiles
- variable zipx
- variable arcx
- variable arjx
- variable lhax
- variable zoox
- variable pakx
- variable viruschk
- variable virusaction
- variable holdingarea
- variable FILEMAN_if_clean
- variable FILELIST_if_virus
- variable describe_4DOS
-
- variable i
- variable s
- variable fh
- variable last_selection 1
- variable first_use 0
- variable m1 "POSTFILE.SCR ~Overview"
- variable m2 "~Picture Viewer Settings"
- variable m3 "~Decompression Settings"
- variable m4 "~Virus Checker Settings"
- variable m5 "~File Manager"
- variable m6 "D~isable POSTFILE.SCR and exit"
- variable m7 "Enable POSTFILE.SCR and e~Xit"
-
- variable postfileini s $SCRIPT_DIR "POSTFILE.INI"
- notexist postfileini assign first_use 1
-
- if first_use = 0
- assign last_selection 2 ;skip Overview on main menu if exists
- fopen fh postfileini "r"
- if $ERRORLEVEL = 0
- fgets picview fh
- fgets picfiles fh
- fgets zipx fh
- fgets arcx fh
- fgets arjx fh
- fgets lhax fh
- fgets zoox fh
- fgets pakx fh
- fgets viruschk fh
- fgets virusaction fh
- fgets holdingarea fh
- fgets FILEMAN_if_clean fh
- fgets FILELIST_if_virus fh
- fgets describe_4DOS fh
- fclose fh
- endif
- endif
-
- strblank picfiles assign picfiles ".GIF.JPG.MAC.BMP.PCX.PIC.TIF.IMG"
- strblank zipx assign zipx "PKUNZIP.EXE -3"
- strblank arcx assign arcx "PKUNPAK.EXE"
- strblank arjx assign arjx "ARJ.EXE e"
- strblank lhax assign lhax "LHA.EXE e"
- strblank zoox assign zoox "ZOO.EXE -e"
- strblank pakx assign pakx "PAK.EXE e"
- strblank viruschk assign viruschk "SW:SCAN *.* /A /nomem /noexpire"
-
- return
-
- ;----------------------------------------------------------------------------
- Overview:
- ;----------------------------------------------------------------------------
-
- wndopen "Overview"
-
- print "POSTFILE.SCR does the following:^M^J"
-
- print "˛ Checks a list of 'picture file' extensions (.GIF, .JPG, .MAC by default)"
- print " and optionally displays any newly downloaded pictures to you.^M^J"
-
- print "˛ Or creates a temporary directory to extract newly downloaded archives into.^M^J"
-
- print "˛ Uncompresses each archive and virus checks it using the external virus"
- print " checking program of your choice.^M^J"
-
- print "˛ Performs a user-defined action if a virus is found (delete the file,"
- print " move it to a holding area, etc).^M^J"
-
- print "˛ Looks for FILE_ID.DIZ and DESC.SDI inside the archive and, if either"
- print " exists, replaces the file description (which will be stored in your"
- print " ^BFILELIST^B Tagger catalog) with the ^"official^" program description.^M^J"
-
- print "˛ Optionally displays the contents of the archive in the ^BFile Manager^B"
- print " allowing you to view and install new programs, then deletes the extracted"
- print " files and removes the temporary directory."
-
- gosub PressKey
-
- print "This main setup program allows you to define the external programs"
- print "POSTFILE.SCR uses to accomplish its task, and to set your preferences."
- print "If you don't want to view newly downloaded pictures automatically, you
- print "can shut the feature off using this program. If you don't want the
- print "^BFile Manager^B to be called automatically when a file passes a virus
- print "check, again you can shut the feature off here.^M^J"
-
- print "Your first time using this main setup program please select EVERY option"
- print "on the main menu just to check that everything is defined properly. If you"
- print "find that you cannot define something properly (i.e. if you don't have a"
- print "Virus Checker as yet) select '^BDisable POSTFILE.SCR^B' when you exit. You can"
- print "always come back and re-enable it once you have everything set up properly."
-
- gosub PressKey
-
- wndclose
- return
-
- ;----------------------------------------------------------------------------
- PicSettings:
- ;----------------------------------------------------------------------------
- wndopen "Picture Settings"
-
- print "If you have a picture viewer that is capable of viewing a variety of"
- print "picture types, AND if the viewer accepts a picture filename on the command"
- print "line, POSTFILE.SCR can use the viewer to display newly downloaded pictures"
- print "to you without your even having to press a key!^M^J"
-
- print "Enter your picture viewer command below just as you'd enter it from the"
- print "DOS command line, but noting the following:^M^J"
-
- print "˛ If the command is preceded by ^BSW:^B then Intellicomm swaps out of base"
- print " memory (to disk or EMS/XMS memory) leaving the picture viewer with"
- print " more memory. If your viewer uses more than 100-150 Kilobytes of memory"
- print " (and most do) you should precede the command with ^BSW:^B to ensure that"
- print " there is enough memory to load the viewer.^M^J"
-
- print "˛ If a percent sign (^B%^B) is placed in the command, POSTFILE.SCR removes"
- print " the ^B%^B and inserts the ^BD:\PATH\FILENAME.EXT^B of the PICTURE where the"
- print " % was. If no % exists, POSTFILE.SCR specifies the picture filename"
- print " just after the picture viewer command.^M^J"
-
- print "Enter your Picture Viewer command, or press ^BEsc^B if you do not want"
- print "pictures to be automatically displayed:^M^J"
-
- strblank picview assign picview "SW:CSHOW %+"
-
- printnc "Picture Viewer: "
- gets picview 61
- if $ERRORLEVEL <> 0
- assign picview ""
- wndclose
- return
- endif
-
- cls
-
- print "You can also add new picture types to the list below, if necessary. This"
- print "list is compared to the file extension (^B.EXT^B) of each newly downloaded"
- print "file to determine which files to display using the Picture Viewer you just"
- print "defined. Make sure you enter a period to separate one extension from the"
- print "next:^M^J"
-
- printnc "^BPicture Extensions: ^B"
- gets picfiles 57
-
- wndclose
- return
-
- ;----------------------------------------------------------------------------
- ArcSettings:
- ;----------------------------------------------------------------------------
- wndopen "Decompression Settings"
-
- print "POSTFILE.SCR supports ^B.ZIP^B, ^B.ARC^B, ^B.ARJ^B, ^B.LHA^B, ^B.ZOO^B and ^B.PAK^B archive types."
- print "In order to uncompress these archives, however, you must have the proper"
- print "utilities installed. [Decompression utilities for all of the above archive"
- print "types are available for download on most any BBS.] It isn't mandatory that"
- print "you obtain and install all the decompression programs, unless the BBS's you"
- print "call frequently have mixed archive types online.^M^J"
-
- print "If you don't have one of the utilities prompted for below, simply press"
- print "the ^BEnter^B key. If you do have the utility but it is not in a directory"
- print "on your DOS PATH, press the ^BIns^B key until the cursor is large, then insert"
- print "the proper ^BD:\PATH\^B before the command (e.g. ^BC:\UTILS\PKUNZIP -3^B).^M^J"
-
- printnc "^B.ZIP Extract: ^B"
- gets zipx 63
- print
- printnc "^B.ARC Extract: ^B"
- gets arcx 63
- print
- printnc "^B.ARJ Extract: ^B"
- gets arjx 63
- print
- printnc "^B.LHA Extract: ^B"
- gets lhax 63
- print
- printnc "^B.ZOO Extract: ^B"
- gets zoox 63
- print
- printnc "^B.PAK Extract: ^B"
- gets pakx 63
- print
-
- wndclose
- return
-
- ;----------------------------------------------------------------------------
- VirusSettings:
- ;----------------------------------------------------------------------------
- wndopen "Virus Checker Settings"
-
- print "Once a newly downloaded archive is decompressed into a temporary directory"
- print "(which POSTFILE.SCR creates) it then executes the command defined below"
- print "to virus check the files within the archive.^M^J"
-
- print "McAfee's ^BSCAN^B is the default virus checker as this utility is available"
- print "for download from most all BBS's. If you wish to use another virus checker,"
- print "define the proper command below.^M^J"
-
- print "˛ Precede the command with ^BSW:^B (Swap) to ensure that the virus checker has
- print " enough memory to work with. Example: ^BSW:SCAN.EXE^B^M^J"
-
- print "˛ If your virus checker is not on your DOS PATH, press the ^BIns^B key until
- print " the cursor is large and insert the proper D:\PATH\.
- print " Example: ^BSW:C:\UTILS\SWAP.EXE^B^M^J"
-
- print "˛ Do NOT define a command that executes a batch file or anything other than
- print " a ^B.COM^B or ^B.EXE^B. POSTFILE.SCR must obtain the ^Berrorlevel^B return code
- print " directly from the virus checking program and batch files do not allow this.^M^J"
-
- printnc "^BVirus Checker: ^B"
- gets viruschk 62
-
- cls
-
- print "If your virus checker returns an errorlevel to indicate a problem, POSTFILE"
- print "performs one of the following actions:^M^J"
-
- print "˛ Enters the ^BFile Manager^B so you can View the files, and/or Delete"
- print " the original archive, and/or shell to DOS. If the archive still"
- print " exists when you exit the File Manager you are asked whether to"
- print " delete it or not (so you needn't go out of your way in the File"
- print " Manager to locate and delete the proper archive).^M^J"
-
- print "˛ OR ^BDeletes^B the archive unconditionally.^M^J"
-
- print "˛ OR ^BMoves^B the archive to a temporary holding area for later examination.^M^J"
-
- print "˛ OR ^BIgnores^B the error (you can do what you want with the file later).^M^J"
-
- print "Note that you will ALWAYS be aware that a file contained a virus, if you"
- print "View the ^BICOM.CAP^B file by selecting ^BReview Session Captures^B from the Icom"
- print "Main Menu. POSTFILE appends the virus checker output to ICOM.CAP if there"
- print "is a problem.^M^J"
-
- try_again:
- printnc "Please select: "
-
- menudefine "~File Manager" "~Delete" "~Move" "~Ignore"
- menubar
-
- if $MENUSELECTION < 1 goto try_again
-
- assign virusaction $MENUSELECTION
-
- if $MENUSELECTION = 3 ;Move
- print "^M^J^JPlease enter the D:\PATH you would like files moved to:
- gets holdingarea 64
- endif
-
- cls
-
- print "You also have the option of entering the ^BFile Manager^B to View and possibly"
- print "install new programs that PASS the virus check. From the File Manager you"
- print "can ^"View^", ^"Edit^", ^"Copy^", ^"Rename/Move^", the files in the archive, or can"
- print "even shell to DOS to perform some custom work.^M^J"
-
- print "Further, if you ^"View^" or ^"Edit^" a ^B.BAT^B, ^B.COM^B, or ^B.EXE^B file from the File"
- print "Manager, you are given the option to EXECUTE the file instead of viewing it."
- print "Thus, you could run any 'INSTALL' program that had been included in the"
- print "archive, to get new programs ready for action!^M^J"
-
- printnc "Enter ^BFile Manager^B after uncompressing new downloads? "
-
- menudefine "~Yes" "~No"
- menubar
-
- if $MENUSELECTION = 1
- assign FILEMAN_if_clean 1
- else
- assign FILEMAN_if_clean 0
- endif
-
- cls
-
- print "^BPROGRAM/SCRIPT DEVELOPERS TAKE NOTE^B: If the file ^B@ICOM.SCR^B is included in"
- print "your archive, POSTFILE.SCR gives the user the option to ^Brun^B it. In"
- print "^B@ICOM.SCR^B you could ^BLIST ^"README.1ST^"^B, you could prompt the user for an"
- print "installation directory or any necessary information ... handling anything"
- print "necessary for program introduction and installation.^M^J"
-
- print "If you include ^B@ICOM.SCR^B in your archive, when Icom users download your"
- print "program, they'll get auto-decompression to a temporary directory, auto-virus"
- print "checking, AND (preferably optional) installation! You can do more from"
- print "^B@ICOM.SCR^B than you could from any INSTALL.BAT file, and probably even"
- print "more than your own custom INSTALL.EXE. ^B@ICOM.SCR^B is particularly useful"
- print "if your program is an Icom-specific script or add-on."
-
- gosub PressKey
-
- print "Just after POSTFILE.SCR finishes, Icom moves the file record (filename,"
- print "description, size, etc) into the Tagger ^BFILELIST^B catalog, to allow you to"
- print "easily tag and upload the file to other BBS's later. However, if a virus is"
- print "found in the file, you probably don't want it to be added to the FILELIST"
- print "catalog.^M^J"
-
- printnc "Skip adding infected files to ^BFILELIST^B? "
- menubar
-
- if $MENUSELECTION = 2 ;No, don't skip (make Yes the default)
- assign FILELIST_if_virus 1
- else
- assign FILELIST_if_virus 0
- endif
-
- cls
-
- print "And one last option. If you use ^B4DOS^B or Norton ^BNDOS^B, POSTFILE.SCR can"
- print "use the ^BDESCRIBE^B command to add the file description to the file on disk!^M^J"
-
- printnc "Would you like to use this feature? "
- menubar $SCRN_X $SCRN_Y 2
-
- if $MENUSELECTION = 1
- assign describe_4DOS 1
- print "^M^J^J^G^BNOTE:^B If you haven't done so already, create 4DOS.INI in your \4DOS"
- print "directory and add the line:^M^J"
- print "^BDescriptionMax = 200^B^M^J"
- print "This allows a much longer description to be added. The default is 40"
- print "characters maximum (one line), and DESCRIBE will ^Bbeep^B at POSTFILE.SCR"
- print "for trying to add longer descriptions without DescriptionMax = 200."
- gosub PressKey
- else
- assign describe_4DOS 0
- endif
-
- wndclose
- return
-
- ;----------------------------------------------------------------------------
- Disable:
- ;----------------------------------------------------------------------------
- assign i $SCRIPT_DIR "POSTFILE.RCS"
- assign s $SCRIPT_DIR "POSTFILE.SCR"
-
- notexist i goto rename_scr
- menudefine "~Yes" "~No"
- menuboxh "WARNING" "^IPOSTFILE.RCS exists, overwrite it?"
- if $MENUSELECTION = 1
- delete i
- else
- assign i $SCRIPT_DIR "POSTFILE.RC1"
- endif
-
- rename_scr:
-
- rename s i
- exit
-
- ;----------------------------------------------------------------------------
- ConfigReminder:
- ;----------------------------------------------------------------------------
-
- if first_use = 0 return
-
- wndopen $SCRIPT_NAME
- print "^M^JTo access this program again in the future, select ^BIntellicomm Setup^B from"
- print "the Icom main menu, then ^BFile Transfer Settings^B and ^BPOSTFILE.SCR Settings^B.^M^J"
- print "Or simply 'Run' the ^BPOSTINI.SCR^B script from the Script Manager."
- gosub PressKey
- wndclose
-
- return
-